<template>
  <div class="hello">
    <App></App>
    <x-header>设置</x-header>

    <group>
      <cell title="账号" :value="username" @click.native="onClick"></cell>
      <cell title="公司" :value="org" @click.native="onClick"></cell>
      <cell title="密码" @click.native="toSetPassword" :is-loading="!password" :value="password" is-link></cell>
      <cell title="姓名" :value="name" is-link></cell>
    </group>
    <box gap="10px 10px">
    <x-button type="warn" link="/login">退出登录</x-button>
    </box>
  </div>
</template>
<script>
import App from '../../App'
import { XHeader, TransferDom, Cell, CellBox, CellFormPreview, Group, Badge, XButton, Box } from 'vux'
import VueRouter from '../../router/routes.js'
// import Vue from 'vue'

// Vue.use(myTabbar)

export default {
  name: 'ApiCenter',
  directives: {
    TransferDom
  },
  components: {
    App,
    XHeader,
    Group,
    Cell,
    CellFormPreview,
    CellBox,
    Badge,
    XButton,
    Box
  },
  data () {
    return {
      username: '1385****793',
      org: '南京睿恒智晟软件科技有限公司',
      password: '修改密码',
      name: '高元'
    }
  },
  methods: {
    toSetPassword () {
      VueRouter.push({
        path: '/accountSetPassword'
      })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>

